'use strict'
let buildType = process.argv.slice(2)[0] || 'prod'
/**
 * 这里是为了把开发环境区分开
 * 看一下开发环境的命令："dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
 * 具体情况根据自己的命令来，总之区分开开发环境即可，也可以写成"dev": "webpack-dev-server development ......."
 */
if (process.argv.slice(2)[0] == '--inline') return
console.log('------strat build------' + buildType)
let BASE_URL
switch (buildType) {
  case 'prod':  // 线上环境打包命令 npm run build
    BASE_URL = 'https://www.123123.com:10104'
    break
  case 'test':  // 测试环境打包命令 npm run build test
    BASE_URL = 'http://192.168.1.189:10425'
    break
  case 'xxx': // npm run build xxx
    BASE_URL = 'https://www.12343.com:10107'
    break
  default:
    BASE_URL = 'https://www.123123.com:10104'
    break
}
module.exports = {
  NODE_ENV: '"production"',
  BASE_URL: JSON.stringify(BASE_URL),
}
